package edu.mse.camel.client.core.session.event;

import edu.mse.camel.client.events.AbstractEvent;
import edu.mse.camel.client.events.EventIDs;

/**
 * This event acts as a marker for events that 
 * stay within the client and do not propagate to the server.
 * Subclass this event if you want to send events that stay 
 * within the client.
 * 
 * @author darpan, melody
 *
 */
public class ClientInternalEvent extends AbstractEvent {
	
	private int type;
	private Object arg;
	
	public ClientInternalEvent(int type, Object arg) {
		this.type = type;
		this.arg = arg;
	}
	
	public int getType() {
		return type;
	}
	
	public Object getArg() {
		return arg;
	}
	
	@Override
	public String getEventID() {
		return EventIDs.CLIENT_INTERNAL_EVENT;
	}
	
	public static int LOGIN = 1;
	public static int LOGOUT = 2;
	public static int CREATE_SESSION = 3;
	public static int LEAVE_SESSION = 4;
	public static int CHANGE_FACILITATOR = 5;
	public static int JOIN_SESSION = 6;
	
	/**
	 * This event is concerned others in the team
	 */
	public static int UPDATE_TEAM_MEMBER_LOGIN_LOGOUT_STATUS = 7;
	
	/**
	 * This event is concerned others in the team
	 */
	public static int UPDATE_TEAM_MEMBER_SESSION_STATUS = 8;
	
	/**
	 * This is used when we only know that the team member's status changed
	 */
	public static int UPDATE_TEAM_MEMBER_STATUS = 9;
	
	public static int ADD_TEAM_MEMBER = 10;
	public static int ADD_TEAM_MEMBER_MANY = 11;
	public static int REMOVE_TEAM_MEMBER = 12;
	public static int ME_CHANGED = 13;

}
